import request from '@/utils/request.js'
export const getArticleList = function(params) {
    return request({
        method: 'GET',
        url: '/v1_1/articles',
        params
    })
}

export const getSuggestion = function(q) {
    return request({
        method: 'GET',
        url: '/v1_0/suggestion',
        params: {
            q: q
        }
    })
}

export const getSearchResult = function(params) {
    return request({
        method: 'GET',
        url: '/v1_0/search',
        params
    })
}

export const loadArticle = function(id) {
    return request({
        method: 'GET',
        url: '/v1_0/articles/' + id
    })
}

export const loadUserArticle = function(params) {
    return request({
        method: 'GET',
        url: '/v1_0/user/articles',
        params
    })
}
